<!DOCTYPE html>
<html class="ui-page-login">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title></title>
    <link href="__PUBLIC__/mui/css/mui.css" rel="stylesheet" />
    <link rel="stylesheet" href="__PUBLIC__/css/cart.css">
    <script src="__PUBLIC__/js/angular.js"></script>
    <!--<script src="__PUBLIC__/home/plugins/layer/layer.js"></script>-->
    <style>
        .area {
            margin: 20px auto 0px auto;
        }
        .mui-input-group:first-child {
            margin-top: 20px;
        }
        .mui-input-group label {
            width: 22%;
        }
        .mui-input-row label~input,
        .mui-input-row label~select,
        .mui-input-row label~textarea {
            width: 78%;
        }
        .mui-checkbox input[type=checkbox],
        .mui-radio input[type=radio] {
            top: 6px;
        }
        .mui-content-padded {
            margin-top: 25px;
        }
        .mui-btn {
            padding: 10px;
        }
        .mui-input-row label~input, .mui-input-row label~select, .mui-input-row label~textarea{
            margin-top: 1px;
        }
        .cart ul li{
            font-family: "Microsoft YaHei UI";
            font-size: 15px;
        }
    </style>
</head>
<body ng-app="myApp" ng-controller="Ctrl" ng-cloak>
<header class="mui-bar mui-bar-nav" style="background: #ef373b;" >
    <a class=" mui-icon mui-icon-left-nav mui-pull-left" id="cart-edit" style="color: white" href="{:U('Index/index')}"></a>
    <h1 class="mui-title" style="color: white ">常见问题</h1>
</header>
<div class="mui-content cart">
    <ul class="mui-table-view" ng-repeat="x in question">
        <li class="mui-table-view-cell mui-media cart-goods" ng-click="detail(x.id)">
            <span style="float: left;">{{x.title}}</span><span style="float: right;font-size: 12px">{{x.updatetime}}</span>
        </li>
    </ul>
</div>

<script>
    var app = angular.module('myApp', []);
    app.controller('Ctrl', function($scope,$http) {
        $http({
            method: 'POST',
            url: "/index.php/Home/Index/question"
        }).then(function successCallback(response) {

            $scope.question = response.data.data
            console.log(response.data);
        }, function errorCallback(response) {

        });

        //问题详情
        $scope.detail=function (id) {
            window.location.href="/index.php/Home/Index/qaqctn?id="+id;
        }
    });
</script>

</body>

</html>